UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = '+z+zoyAJ+FRNUpUNfgnu9pqMkR8rew7cvT0U/bLXMXU=' 
WHERE 
  key_id = '125ad89973126a34cf7b2f7dc16f641ac42b1c5d11c76682bb8b48e08b21260c' 
  AND (
    token = '+z+zoyAJ+FRNUpUNfgnu9pqMkR8rew7cvT0U/bLXMXU=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00033