UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = '1TGB4v6z8Bj1Nlp+C9YN1S2KQsM9A606rd1jCcmWOFU=' 
WHERE 
  key_id = 'c146ed68f7d5a0f93c847bb3337abb19cc2e8fd5ad70e37c8c6243e2d26013b9' 
  AND (
    token = '1TGB4v6z8Bj1Nlp+C9YN1S2KQsM9A606rd1jCcmWOFU=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00049