UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'hJ8D8yZjeBOo49HVRTXrEyoIRX4v//szo0VA16lJkL0=' 
WHERE 
  key_id = '0c9cd761d3149f72eed9330cd0ab4442af002401b8479ad8cbcafe7298570fb7' 
  AND (
    token = 'hJ8D8yZjeBOo49HVRTXrEyoIRX4v//szo0VA16lJkL0=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00021