UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 't8QI4TN2wxnNWhdu3Jk+RxrVCb/KxoowEDlnCkMiXwI=' 
WHERE 
  key_id = '72f6c5ffb644e23545992c8a9dd8427cafc9c795eb01d62433d55187addd6a43' 
  AND (
    token = 't8QI4TN2wxnNWhdu3Jk+RxrVCb/KxoowEDlnCkMiXwI=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00018