UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'vUJWe8UAuCeJTrpDcKyEn8UdWJ5zFdv3uk1X8vAumrI=' 
WHERE 
  key_id = '556427eceec685882068e5e82c7f232199262005dd2774cecee861e88128b922' 
  AND (
    token = 'vUJWe8UAuCeJTrpDcKyEn8UdWJ5zFdv3uk1X8vAumrI=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00035