UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = '3U/UlD1O/pNMfGpt34ELj6aUpeJ6WV58Cgp894X3AHk=' 
WHERE 
  key_id = 'd73f9899c8b0c80297cc1af9f9c228ceb46b1a95b2c01de1b00ca106d0ac795d' 
  AND (
    token = '3U/UlD1O/pNMfGpt34ELj6aUpeJ6WV58Cgp894X3AHk=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00027