UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = '/FrVBRR3arDMdIgq1w1CkBY+ImnRmo4sPAS77hmYW0o=' 
WHERE 
  key_id = '3628aeef4b1777dafb30d991bac3f3ebcee3689db3681d55a1b9b41f67a6da34' 
  AND (
    token = '/FrVBRR3arDMdIgq1w1CkBY+ImnRmo4sPAS77hmYW0o=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00033