UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'mbPvdyH8+wmfGHsXy5ZfGz8mSKM0T66qd13olHYt+RI=' 
WHERE 
  key_id = 'bac5439b44ff6e976c8e6ebc2dbb0e213bd1c31bba07eee795bebfeeb3a3fbbf' 
  AND (
    token = 'mbPvdyH8+wmfGHsXy5ZfGz8mSKM0T66qd13olHYt+RI=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00039