UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'zua/KLBVCLF5mnKkvXjykxdGHyQSMQQUsymqq/jAjoo=' 
WHERE 
  key_id = 'db9ce9b553ed42a5de5809d2c35b920f75c69059604f5d54f911b30e21a1e59c' 
  AND (
    token = 'zua/KLBVCLF5mnKkvXjykxdGHyQSMQQUsymqq/jAjoo=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00018