UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'VmFc9RLlRudXXxR3lHJenSlLxj1wF6faotnaWvhpyQQ=' 
WHERE 
  key_id = '10b92f01a5e29d4d024ac04fede4636aef7e6eb14d1b14fb87c2f075f132ae4f' 
  AND (
    token = 'VmFc9RLlRudXXxR3lHJenSlLxj1wF6faotnaWvhpyQQ=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00020