UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'bzumio1uZ5CRtf2EhbBBcWpnUdHuIRYyKdsH3+SZTR8=' 
WHERE 
  key_id = 'b11ab95ab1544eb17760cfb181584980e51c716cbe49ec6f29197b5edbd9a9eb' 
  AND (
    token = 'bzumio1uZ5CRtf2EhbBBcWpnUdHuIRYyKdsH3+SZTR8=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00036