UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'aQXzt3eYO4se9DEOW4PVClNGSTFzgJQvk5PXlr+6NkA=' 
WHERE 
  key_id = '0704df5ff2ea06414cdcc67c4756c1df82d77eb029c7f8368cdda17a508d7211' 
  AND (
    token = 'aQXzt3eYO4se9DEOW4PVClNGSTFzgJQvk5PXlr+6NkA=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00050