UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = '+4pY3iLDsUDlXPiNC1hiJhM3WrRm/qroWADIgFMIXq8=' 
WHERE 
  key_id = 'fb30e8eae2a48d4bff588ecfec72e410b3153b06a75f43feceb69fbb38cef8c2' 
  AND (
    token = '+4pY3iLDsUDlXPiNC1hiJhM3WrRm/qroWADIgFMIXq8=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00038