UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'Q6DblXlZhzXeoiIw4YexUNdGgVfzXiK9f50PH6WVenE=' 
WHERE 
  key_id = '3541a465955e94dd2352db4cebdeebee8e3906bf4250667396864554ad1dd63e' 
  AND (
    token = 'Q6DblXlZhzXeoiIw4YexUNdGgVfzXiK9f50PH6WVenE=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00040