UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'vjQWL6HUzI/Qis6ImFTgClFhhCnGBNZHcIPUoIo6LSA=' 
WHERE 
  key_id = '6c0c1314bc629e0a76612cffd87d71ae632e3b4fafa2aaf9e845ab8c714e453e' 
  AND (
    token = 'vjQWL6HUzI/Qis6ImFTgClFhhCnGBNZHcIPUoIo6LSA=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00033