UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = '55zPT6lwiCPYxh7CZhwtdKpgh3HtQFa+hBd29lm9lh4=' 
WHERE 
  key_id = 'b1dd2088e05f75366d9547f8bf8142aecde1b3445073e3b063c87648ba15c27c' 
  AND (
    token = '55zPT6lwiCPYxh7CZhwtdKpgh3HtQFa+hBd29lm9lh4=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00025