UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'GNYJh9cOnIyBX4es37kIQ05Hqo5N0KwqSk1CU25beuY=' 
WHERE 
  key_id = '11ff4d102f703ccdd4ebb907a7209f5e6ca8e3f3087572b0d22d3ee953e8db3b' 
  AND (
    token = 'GNYJh9cOnIyBX4es37kIQ05Hqo5N0KwqSk1CU25beuY=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00055