UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'vL8KCOmhLTO2N/rdff4hP0MwFn5e6+FB6QkLfGL3wnY=' 
WHERE 
  key_id = 'fbd5eca3f1d4c0b4b1b8a9a00fd48f907c3d490dd4f117da3c9b1b8520e050a4' 
  AND (
    token = 'vL8KCOmhLTO2N/rdff4hP0MwFn5e6+FB6QkLfGL3wnY=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00050