UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = '0aHCwHSQXTJcOjY2C7nHHme9Zl8VkvZwf1n/mUwV52o=' 
WHERE 
  key_id = 'c17df26d0d728ea8d9bb69b9c7e06b4cefacc9d0959fdc69e1555003d3823f3d' 
  AND (
    token = '0aHCwHSQXTJcOjY2C7nHHme9Zl8VkvZwf1n/mUwV52o=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00036