UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = '73ViN2OZ/vfiV/AVg9OTsUS6o3YW6VM+9N8Yp1bb/Qs=' 
WHERE 
  key_id = 'fd36d1dd8c8647912921f6518c894150f6a9d50a05fd0b650754ce5fe35c6a5a' 
  AND (
    token = '73ViN2OZ/vfiV/AVg9OTsUS6o3YW6VM+9N8Yp1bb/Qs=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00020