UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'z1rpXoWcsv1F39zBgaSk4Ytxz1h5/hPpAcbkhdcYT7M=' 
WHERE 
  key_id = 'ab0bcf380ac2ddcc912bd80dbb424bdb5136ea6b2ea9985a11caf1f1a997ba44' 
  AND (
    token = 'z1rpXoWcsv1F39zBgaSk4Ytxz1h5/hPpAcbkhdcYT7M=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00050