UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'avcryRFGnSFGh/H2Mfj5PNdYs10JwudHI+y/Oa5RUUE=' 
WHERE 
  key_id = '6580c2c9ce256e2cb98e5424f592cd6c94f92bdbe74755af5ad57063a5ae54fa' 
  AND (
    token = 'avcryRFGnSFGh/H2Mfj5PNdYs10JwudHI+y/Oa5RUUE=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00038