UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'fiqnjtwNp9DzrZ8mkJyRfi+W16LbjfGjDNwy/oiRyGs=' 
WHERE 
  key_id = '3ccc1635adfc6868978c4903e688d3502d4b12bb57d0e5a3eaaa983a4b55a641' 
  AND (
    token = 'fiqnjtwNp9DzrZ8mkJyRfi+W16LbjfGjDNwy/oiRyGs=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00059