UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'luexbXqonG0+yKlVKFjU7UPqLqa9c/XolioD2uk0nMc=' 
WHERE 
  key_id = '3b4b98552fe0bccd1c409df97ac3db3748d6c5538fe1e23e5021ab7a2f86da9c' 
  AND (
    token = 'luexbXqonG0+yKlVKFjU7UPqLqa9c/XolioD2uk0nMc=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00019