UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'Kk4XwHOkhzuRJEKRcDPNEZvF25N76RXR3O1kA34hiOk=' 
WHERE 
  key_id = '1ac2cd4c9dc32a6f6c4d7f52b97e9ab928a0c90d1b98a93ac266010aac434b0c' 
  AND (
    token = 'Kk4XwHOkhzuRJEKRcDPNEZvF25N76RXR3O1kA34hiOk=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00023