UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = '+jBYuNYUQmig+z8ajUDE3k4niln0fr/ce8ML2NW29Yo=' 
WHERE 
  key_id = '75f213bd43702bb74a23f7e0c529e26214f3aa411c58e80a7b6366bb48382a7e' 
  AND (
    token = '+jBYuNYUQmig+z8ajUDE3k4niln0fr/ce8ML2NW29Yo=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00026