UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = '60Y5DWPiF+UmCl08Rg0mSsbjDpbAuLA+RdImpOyge9g=' 
WHERE 
  key_id = '6a4a3aff2657bb9f9c38c26d88f928b05d2a50af801b1b0f7432da5e4e365187' 
  AND (
    token = '60Y5DWPiF+UmCl08Rg0mSsbjDpbAuLA+RdImpOyge9g=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00047