UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'HmhIOVVyUJS1Dmq0prK5+Bxuzt8wCi2r89umMkCGm8I=' 
WHERE 
  key_id = '103a51078bce40fb77e48362526176a683e928fdd32767ef56e56aca6eea69ba' 
  AND (
    token = 'HmhIOVVyUJS1Dmq0prK5+Bxuzt8wCi2r89umMkCGm8I=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00058