UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'Zk4+3ityVV5Njjsj7JpvMzh5ZowBgf1qO0UzSon6QVs=' 
WHERE 
  key_id = '0bd75f04978f27edc9d3fb3a0ad4d06701a8ffa466f1e35124d5c27461ec74d3' 
  AND (
    token = 'Zk4+3ityVV5Njjsj7JpvMzh5ZowBgf1qO0UzSon6QVs=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00013