UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = '7SZLlG4uZLw2DHBi4ywxuWiLfHXS2oSwdlL00u33sc4=' 
WHERE 
  key_id = '5fbfd7674031730a7fd1279a71a2c7ca35e583400d31c8c1287eebedb48e3eb9' 
  AND (
    token = '7SZLlG4uZLw2DHBi4ywxuWiLfHXS2oSwdlL00u33sc4=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00039