UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'vILyEC1DBBqRIoYkkV4y0Dgp7I20yoBd9aDWHwUw2Pw=' 
WHERE 
  key_id = '604be937077bc3318b70831929f8cef483994b5196b4ae081290225de1ebc3cd' 
  AND (
    token = 'vILyEC1DBBqRIoYkkV4y0Dgp7I20yoBd9aDWHwUw2Pw=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00022