UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'Cj/l5k/UFZvGiscU5/JISBKopP9NNXBIkrw5H42CSsc=' 
WHERE 
  key_id = '5f98e52b7b37b64c9d05ae1ea9be68812e9d29c1067bc99f2996c0a669f616d2' 
  AND (
    token = 'Cj/l5k/UFZvGiscU5/JISBKopP9NNXBIkrw5H42CSsc=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00020