UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'jpZ4V3Xyx4BbxpOYmgMi1Sn67aB5GY5Xs8ic8WHk09w=' 
WHERE 
  key_id = '1479c5d22ca542c302a3be5a9db619f92b7701e3eb28c778fd0ea9b2c893b1dd' 
  AND (
    token = 'jpZ4V3Xyx4BbxpOYmgMi1Sn67aB5GY5Xs8ic8WHk09w=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00035