UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'Lqxjl3go/GDHYWpqsvPB65dfKsw3vxgROQEylnUz71U=' 
WHERE 
  key_id = 'a69ef46b1f78be124ad29e1702fce8a281e84a4fcf05dbb8aa771ba92c3778e0' 
  AND (
    token = 'Lqxjl3go/GDHYWpqsvPB65dfKsw3vxgROQEylnUz71U=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00041